get_cli() {

    sudo rm -rf ${bin_path}/${cli}
    wget https://ghproxy.net/https://github.com/${ower}/${repos}/releases/download/${version}/${file_name}
    # tar zxvf ${file_name}
    mv ${file_name} ${cli}
    chmod +x ${cli}
    sudo mv ${cli} ${bin_path}
    rm -rf LICENSE README.md
}
get_env() {

    ower="kubeshark"
    repos="kubeshark"
    cli="$repos"
    version=$(curl -s https://api.github.com/repos/${ower}/${repos}/releases | jq -r '.[0].name')

    bin_path="/usr/local/bin"
    OS=$(echo $(uname -s) | tr '[:upper:]' '[:lower:]')
    ARCH=$(echo $(uname -m) | tr '[:upper:]' '[:lower:]')

    if [ "$ARCH" = "x86_64" ]; then
        ARCH="amd64"
    fi

    if [ "$ARCH" = "aarch64" ]; then
        ARCH="arm64"
    fi
    file_name="${cli}_${OS}_${ARCH}"
    echo $file_name

}

get_env
get_cli
